﻿using UnityEngine;

public class Main : MonoBehaviour
{

    // Start is called before the first frame update
    private void Start()
    {
        Global.MainBehaviour = this;
        LogUtil.Ins.OnInit();
        GLModuleMgr.Ins.OnInit();
        LogUtil.Ins.OnInitFinish();
        GLModuleMgr.Ins.OnInitFinish();
        DontDestroyOnLoad(this.gameObject);
    }

    private void FixedUpdate()
    {
        GLModuleMgr.Ins.OnFixedUpdate(Time.fixedDeltaTime);
    }

    // Update is called once per frame
    private void Update()
    {
        GLModuleMgr.Ins.OnUpdate(Time.deltaTime);
        LogUtil.Ins.OnUpdate(Time.deltaTime);
    }

    private void OnDestroy()
    {
        GLModuleMgr.Ins.OnDestroy();
        LogUtil.Ins.OnDestroy();
    }
}
